﻿@model IEnumerable<Barry.BarbeSystem.Models.BarberDetail>
@{
    ViewBag.Title = "Index";
}
@section header{
    <script src="../../Scripts/operation.js" type="text/javascript"></script>
    <script type="text/javascript">
        function doSearch() {
            $("#dg").datagrid('load', {
                category: $("#category").val(),
                detail: $("#detail").val()
            });
        }

    </script>
}
<div id="tb" style="padding: 5px; height: auto">
    <div class="actionButton">
        @Html.ActionLink(" 新 建 ", "Create", null, new { @class = "easyui-linkbutton", @plain = "true", @iconcls = "icon-add" })
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-edit" plain="true"
            onclick="updateItem('/barberdetail/edit/') ">修改</a> <a href="javascript:void(0)" class="easyui-linkbutton"
                iconcls="icon-remove" plain="true" onclick=" destroyItem('/barberdetail/delete') ">删除</a>
    </div>
    <div>
        项目类别:
        <input class="" style="width: 80px" id="category">
        项目详情：<input type="text" id="detail" style="width: 80px;" />
        <a href="#" class="easyui-linkbutton" iconcls="icon-search" onclick=" doSearch() ">Search</a>
    </div>
</div>
<table id="dg" data-options="rownumbers:true,singleSelect:true,pagination:true" title="理发项目详情"
    class="easyui-datagrid" url="/barberdetail/pageindex" toolbar="#tb">
    <thead>
        <tr>
            <th field="BarberCategoryName" formatter="(function(v,r,i){return formatColumn('BarberCategory.Name',v,r,i);})"
                data-options="width:200">
                @Html.DisplayNameFor(model => model.BarberCategory.Name)
            </th>
            <th field="Name" data-options="width:200">
                @Html.DisplayNameFor(model => model.Name)
            </th>
             <th field="Money" data-options="width:100">
                @Html.DisplayNameFor(model => model.Money)
            </th>
        </tr>
    </thead>
    <tbody>
    </tbody>
</table>
